__author__ = 'golsee'

from flask import Blueprint
from . import page, backup

admin = Blueprint('admin', __name__)

admin.add_url_rule('article', view_func=page.article)
admin.add_url_rule('', view_func=page.index)
admin.add_url_rule('users', view_func=page.users)
admin.add_url_rule('useredit/<id>', view_func=page.useredit, methods=['GET', 'POST'])
admin.add_url_rule('userdelete/<id>', view_func=page.userdelete)
admin.add_url_rule('category', view_func=page.category)
admin.add_url_rule('categorycreate', view_func=page.categorycreate, methods=['GET', 'POST'])
admin.add_url_rule('categoryedit/<id>', view_func=page.categoryedit, methods=['GET', 'POST'])
admin.add_url_rule('categorydelete/<id>', view_func=page.categorydelete)
admin.add_url_rule('articledelete/<id>', view_func=page.articledelete)
admin.add_url_rule('admin_second_bar', view_func=page.admin_second_bar)
admin.add_url_rule('admin_second_baredit/<id>', view_func=page.admin_second_baredit, methods=['GET', 'POST'])
admin.add_url_rule('settings', view_func=page.settings, methods=['GET', 'POST'])
admin.add_url_rule('imgs', view_func=page.imgs)
admin.add_url_rule('atts', view_func=page.atts)
admin.add_url_rule('rmfile/<filename>/<urls>', view_func=page.rmfile)
admin.add_url_rule('backup', view_func=backup.backup)
admin.add_url_rule('dobackup', view_func=backup.dobackup)